package com.wangxinyuchuan.demo.factory_method;

import com.wangxinyuchuan.demo.factory_method.Factory;
import com.wangxinyuchuan.demo.factory_method.IDCardFactory;
import com.wangxinyuchuan.demo.factory_method.Product;

/**
 * @author wangxinyuchuan
 * @date 2023/4/12 11:31 AM
 */
public class Main {
    public static void main(String[] args) {
        Factory idCardFactory = new IDCardFactory();
        Product p1 = idCardFactory.create("小明");
        Product p2 = idCardFactory.create("小红");
        Product p3 = idCardFactory.create("小张");
        p1.use();
        p2.use();
        p3.use();
    }
}
